#!/usr/bin/perl -w

$file = shift;
open FILE, "< $file";
@ar = <FILE>;

foreach (@ar) {
     s/Wilma/0_0/ig; 
     s/Fred/Wilma/ig;
     s/0_0/Fred/gi;
     
}
open (OUT, ">", "$file.out");
print OUT @ar;
